import { reactive } from '../core/reactive.js'

const obj = {
  a: 1,
  b: 2,
  get c() {
    return this.a + this.b
  },
  person: {
    name: 'Kiven'
  }
}

const proxyObj = reactive(obj)

proxyObj.person.name = 'Kiven222'
console.info(proxyObj.person.name)

// console.info(proxyObj)
// console.info(proxyObj.a)
// proxyObj.b++
// console.info(proxyObj.c)
// console.info('d' in proxyObj)
// delete proxyObj.d

// const keys = Object.keys(proxyObj)
// console.info(keys)


const array = [1, 2, 3, 4]
const proxyArray = reactive(array)

delete proxyArray[1]

console.info(proxyArray)
